package com.freecloud.bittorrent.demo.constant;

import com.freecloud.bitorrent.common.util.NetworkUtil;
import com.freecloud.bitorrent.common.util.NodeIdUtil;

/**
 * @Author: maomao
 * @Date: 2021/11/24 5:17 下午
 */
public class DhtConstant {

    /**
     * 本机IP地址
     */
    public static final String LOCAL_IP = NetworkUtil.getIp();

    //    public static final String LOCAL_IP = NetUtil.getIpByHost("0.tcp.jp.ngrok.io");
    /**
     * 本机DHT节点ID（根据IP生成）
     */
    public static final byte[] SELF_NODE_ID = NodeIdUtil.randSelfNodeId(LOCAL_IP);

    /**
     * 下载地址
     */
    public static final String DOWNLOAD_FILE_URL = "magnet:?xt=urn:btih:d0f400429f123654e3ea1fcc461c3921f92a36dd";
}
